package com.mojito.learn.module.jdk.spi;

import java.sql.SQLException;
import java.util.ServiceLoader;

/**
 * @author liufq
 * @since 2022/3/2 下午3:24
 */
public class SpiTest {

    public static void main(String[] args) throws SQLException {
        ServiceLoader<Search> s = ServiceLoader.load(Search.class);
        for (Search search : s) {
            search.searchDoc("hello world");
        }
    }
}
